package com.zhaopin.bean;

/**
 * @author yin.peide
 * @date 2021-08-26 10:18
 */
public class CompareClazz implements Comparable<CompareClazz> {


    private int value;

    public CompareClazz(int value) {
        this.value = value;
    }

    @Override
    public int compareTo(CompareClazz o) {
        return CompareClazz.compare(value, o.value);
    }

    public static int compare(int o1, int o2) {
        if (o1 < o2) {
            return -1;
        }

        if (o1 > o2) {
            return 1;
        }
        return 0;

    }

    @Override
    public String toString() {
        return "CompareClazz{" +
                "value=" + value +
                '}';
    }
}
